//go:generate fyne bundle -o bundled.go assets
//go:debug go run --tags debug .
package main

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/widget"
)

func makeUI() (*widget.Label, *widget.Entry) {
	out := widget.NewLabel("Hello Func")
	in := widget.NewEntry()

	in.OnChanged = func(content string) {
		out.SetText("Hello " + content)
	}
	return out, in
}

func main() {
	application := app.New()
	application.Settings().SetTheme(newFysionTheme())
	window := application.NewWindow("fyne-practice")
	window.Resize(fyne.NewSize(768, 512))

	window.SetContent(makeGUI())

	window.ShowAndRun()
}
